home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 48 / Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso / -screenplay- / hd_installers / whd_installers / games_u-z / vitallight.lha / VitalLightHD / Install next >
Text File  |  1980-01-26  |  4KB  |  199 lines

  1. ;****************************
  2. (set #sub-dir "data")
  3. (set #readme-file "VitalLight.readme")    ;name of readme file
  4. (set #last-file "DAT15")    ;last file the imager should create
  5.  
  6. ;****************************
  7. ;----------------------------
  8. ; Checks if given program is reachable via the path
  9. ; if not abort install
  10. ; IN:  #program - to check
  11. ; OUT: -
  12.  
  13. (procedure P_chkrun
  14.   (if
  15.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  16.     ("")
  17.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  18.   )
  19. )
  20.  
  21. (procedure P_disk
  22.   (askdisk
  23.     (dest #AD_disk)
  24.     (prompt ("\nInsert Disk 1 in any drive !"))
  25.     (help @askdisk-help)
  26.   )
  27. )
  28.  
  29. ;****************************
  30.  
  31. (if
  32.   (exists #readme-file)
  33.   (if 
  34.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  35.     ("")
  36.     (run ("SYS:Utilities/More %s" #readme-file))
  37.   )
  38. )
  39.  
  40. (set #program "WHDLoad")
  41. (P_chkrun)
  42.  
  43. (set #program "RawDIC")
  44. (P_chkrun)
  45.  
  46. (set #program "XFDDecrunch")
  47. (P_chkrun)
  48.  
  49. (if
  50.   (= @user-level 2)
  51.   (
  52.     (set #CI_drive
  53.       (askchoice
  54.     (prompt "Select source drive for diskimages")
  55.     (default 0)
  56.     (choices "DF0:" "DF1:" "DF2:" "DF3:")
  57.     (help @askchoice-help)
  58.       )
  59.     )
  60.     (select #CI_drive
  61.       (set #CI_drive "DF0:")
  62.       (set #CI_drive "DF1:")
  63.       (set #CI_drive "DF2:")
  64.       (set #CI_drive "DF3:")
  65.     )
  66.   )
  67.   (set #CI_drive "DF0:")
  68. )
  69.  
  70. (set @default-dest
  71.   (askdir
  72.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  73.     (help @askdir-help)
  74.     (default @default-dest)
  75.     (disk)
  76.   )
  77. )
  78. (set #dest (tackon @default-dest @app-name))
  79. (if
  80.   (exists #dest)
  81.   (
  82.     (set #choice
  83.       (askbool
  84.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  85.         (default 1)
  86.         (choices "Delete" "Skip")
  87.         (help @askbool-help)
  88.       )
  89.     )
  90.     (if
  91.       (= #choice 1)
  92.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  93.     )
  94.   )
  95. )
  96.  
  97. (makedir #dest
  98.   (help @makedir-help)
  99.   (infos)
  100. )
  101.  
  102.  
  103. ;----------------------------
  104.  
  105. (if
  106.   (exists ("%s.newicon" @app-name))
  107.   (set #icon
  108.     (askchoice
  109.       (prompt "\nWhich icon do you like to install ?\n")
  110.       (default 0)
  111.       (choices "Normal" "NewIcon")
  112.       (help @askchoice-help)
  113.     )
  114.   )
  115.   (set #icon 0)
  116. )
  117. (select #icon
  118.   (set #icon ("%s.inf" @app-name))
  119.   (set #icon ("%s.newicon" @app-name))
  120. )
  121. (copyfiles
  122.   (help @copyfiles-help)
  123.   (source #icon)
  124.   (newname ("%s.info" @app-name))
  125.   (dest #dest)
  126. )
  127. (copyfiles
  128.   (help @copyfiles-help)
  129.   (source ("%s.slave" @app-name ))
  130.   (dest #dest)
  131. )
  132. (if
  133.   (exists #readme-file)
  134.   (copyfiles
  135.     (help @copyfiles-help)
  136.     (source #readme-file)
  137.     (dest #dest)
  138.   )
  139. )
  140. (if
  141.   (exists ("%s.info" #readme-file))
  142.   (copyfiles
  143.     (help @copyfiles-help)
  144.     (source ("%s.info" #readme-file))
  145.     (dest #dest)
  146.   )
  147. )
  148.  
  149. (if
  150.   (= #sub-dir "")
  151.   ("")
  152.   (
  153.     (set #dest (tackon #dest #sub-dir))
  154.     (makedir #dest
  155.       (help @makedir-help)
  156.     )
  157.   )
  158. )
  159.  
  160. (copyfiles
  161.   (help @copyfiles-help)
  162.   (source ("OSEmu.400" @app-name ))
  163.   (dest #dest)
  164. )
  165.  
  166. (copyfiles
  167.   (help @copyfiles-help)
  168.   (source ("%s.islave" @app-name))
  169.   (dest #dest)
  170. )
  171.  
  172. (set #AD_disk "Empty")
  173. (P_disk)
  174.  
  175. (copyfiles
  176.   (help @copyfiles-help)
  177.   (source ("%s:Vital-Light" #AD_disk))
  178.   (dest #dest)
  179.   (all)
  180. )
  181.  
  182. (run ("cd \"%s\"\nxfdDecrunch Vital-Light" #dest))
  183.  
  184.  
  185. (working)
  186. (run ("CD \"%s\"\nRawDIC SLAVE=%s.islave SOURCE=%s\nDelete %s.islave" #dest @app-name #CI_drive @app-name))
  187.  
  188. (if
  189.   (exists (tackon #dest #last-file))
  190.   ("")
  191.   (abort "Diskimaging not successful !\nRawDIC was unable to create all needed files !")
  192. )
  193.  
  194. ;----------------------------
  195.  
  196. (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete temporary files
  197.  
  198. (exit)
  199.